<template>
	<view>
		<uni-nav-bar left-icon="arrowthinleft" title="快捷发布" :border="false" :fixed="true" bg="bg-transparent" color="#333" @clickLeft="back()"></uni-nav-bar>
		<view class="flex bg-fff relative align-center justify-between flex-direction padding-bottom-40" style="height: 90vh;z-index: 99999;overflow: hidden;">
			<!-- 分类 -->
			<view class="flex align-center   flex-wrap margin-top-30">
				<view v-for="(item,index) in cate" :key='index' @click="jump('/pages/fabu/fabu?cate_id='+item.id)" class="w25 text-center margin-bottom-24">
					<image :src="item.pic" class="index_icon"></image>
					<view class="fs-24 color-000">{{item.name}}</view>
				</view>
			</view>
			<!-- 分类end -->
			<image @click="sjump('/pages/index/index')" src="../../static/img/close.png" style="width: 80rpx;height: 80rpx;"></image>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				cate:[]
			}
		},
		onShow() {
			this.init()
		},
		methods:{
			init() {
				this.$api.classify({
					pid: 5
				}).then(res => {
					if (res.code == 1) {
						this.cate = res.data;
					}
				})
			},
			
			back(){
				uni.switchTab({
					url:'/pages/index/index'
				})
			}
		}
	}
</script>

<style>
	/* page{background: linear-gradient(to bottom, #FF7B00,#FCBA72,#FFFFFF,#FFFFFF,#FFFFFF,#FFFFFF);} */
</style>
<style lang="scss" scoped>
	.index_icon{width: 70rpx;height: 70rpx;}
</style>
